if (data->actors)
g_slist_free_full (data->actors, (GDestroyNotify) g_object_unref);
- g_free (data);
+ g_slice_free (AsyncTextureLoadData, data);
}
/**
StTextureCachePropertyBind *bind = data;
if (bind->weakref_active)
g_object_weak_unref (G_OBJECT (bind->actor), st_texture_cache_bind_weak_notify, bind);
- g_free (bind);
+ g_slice_free (StTextureCachePropertyBind, bind);
}
/**
actor = create_invisible_actor ();
clutter_actor_set_size (actor, size, size);
- bind = g_new0 (StTextureCachePropertyBind, 1);
+ bind = g_slice_new0 (StTextureCachePropertyBind);
bind->cache = cache;
bind->actor = actor;
bind->size = size;
if (pending == NULL)
{
/* Not cached and no pending request, create it */
- *request = g_new0 (AsyncTextureLoadData, 1);
+ *request = g_slice_new0 (AsyncTextureLoadData);
if (policy != ST_TEXTURE_CACHE_POLICY_NONE)
g_hash_table_insert (cache->priv->outstanding_requests, g_strdup (key), *request);
}
g_object_unref (d->gfile);
g_object_unref (d->actor);
g_object_unref (d->cancellable);
- g_free (d);
+ g_slice_free (AsyncImageData, d);
}
static void
g_assert (paint_scale > 0);
g_assert (resource_scale > 0);
- data = g_new0 (AsyncImageData, 1);
+ data = g_slice_new0 (AsyncImageData);
data->grid_width = grid_width;
data->grid_height = grid_height;
data->paint_scale = paint_scale;